#include <stdio.h>

int main() {
    int a, n;
    scanf("%d %d", &a, &n); 

    int c = 0;
    int d = 0;
    
    for (int i = 1; i <= n; i++) {
        d = d * 10 + a;  
        c += d;        
    }

    printf("s = %d\n", c);
    
    return 0;
}
